﻿using System;
using System.Web.Mvc;
using FormAuthentication.Practice.Areas.Customer.Controllers;

namespace FormAuthentication.Practice.Areas.Customer
{
    public class CustomerAreaRegistration : AreaRegistration
    {

        public static Func<ActionResult> LoginUrl =>()=>new HomeController().Login();

        public override string AreaName => "Customer";

        public override void RegisterArea(AreaRegistrationContext context) 
        {
            context.MapRoute(
                "Customer_default",
                "Customer/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                new[] { "FormAuthentication.Practice.Areas.Customer.Controllers" }
            );
        }
    }
}